package com.wz.project.bas.trayCodeHead.service.impl;

import com.wz.common.utils.text.Convert;
import com.wz.project.bas.trayCodeHead.domain.BasTraycodeHead;
import com.wz.project.bas.trayCodeHead.mapper.BasTraycodeHeadMapper;
import com.wz.project.bas.trayCodeHead.service.IBasTraycodeHeadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 托盘条码头部Service业务层处理
 * 
 * @author wz
 * @date 2021-11-22
 */
@Service
public class BasTraycodeHeadServiceImpl implements IBasTraycodeHeadService 
{
    @Autowired
    private BasTraycodeHeadMapper basTraycodeHeadMapper;

    /**
     * 查询托盘条码头部
     * 
     * @param tHead 托盘条码头部ID
     * @return 托盘条码头部
     */
    @Override
    public BasTraycodeHead selectBasTraycodeHeadById(String tHead)
    {
        return basTraycodeHeadMapper.selectBasTraycodeHeadById(tHead);
    }

    /**
     * 查询托盘条码头部列表
     * 
     * @param basTraycodeHead 托盘条码头部
     * @return 托盘条码头部
     */
    @Override
    public List<BasTraycodeHead> selectBasTraycodeHeadList(BasTraycodeHead basTraycodeHead)
    {
        return basTraycodeHeadMapper.selectBasTraycodeHeadList(basTraycodeHead);
    }

    /**
     * 新增托盘条码头部
     * 
     * @param basTraycodeHead 托盘条码头部
     * @return 结果
     */
    @Override
    public int insertBasTraycodeHead(BasTraycodeHead basTraycodeHead)
    {
        return basTraycodeHeadMapper.insertBasTraycodeHead(basTraycodeHead);
    }

    /**
     * 修改托盘条码头部
     * 
     * @param basTraycodeHead 托盘条码头部
     * @return 结果
     */
    @Override
    public int updateBasTraycodeHead(BasTraycodeHead basTraycodeHead)
    {
        return basTraycodeHeadMapper.updateBasTraycodeHead(basTraycodeHead);
    }

    /**
     * 删除托盘条码头部对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBasTraycodeHeadByIds(String ids)
    {
        return basTraycodeHeadMapper.deleteBasTraycodeHeadByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除托盘条码头部信息
     * 
     * @param tHead 托盘条码头部ID
     * @return 结果
     */
    @Override
    public int deleteBasTraycodeHeadById(String tHead)
    {
        return basTraycodeHeadMapper.deleteBasTraycodeHeadById(tHead);
    }
}
